<?php

namespace App\Models;

use App\Engine\BaseModel;
use Illuminate\Database\Eloquent\Model;

class Yuyue extends BaseModel
{
    protected $fillable=['uid','name','mobile','time','state'];
    public function user()
    {
        return $this->belongsTo('App\Models\User','uid','id');
    }

    public function getTimeAttribute($value)
    {
        return date("Y-m-d H:i:s",$value);
    }

    public function setTimeAttribute($value)
    {
        $this->attributes['time']=strtotime($value);
    }
}


